//import 'dart:async';
//
//import 'package:flutter_app_master/api/api.dart';
//import 'package:flutter_app_master/bean/account_skills_entity.dart';
//import 'package:flutter_app_master/bean/bank_list_entity.dart';
//import 'package:flutter_app_master/bean/bill_entity.dart';
//import 'package:flutter_app_master/bean/general_submission_entity.dart';
//import 'package:flutter_app_master/bean/get_sign_contract_manage_entity.dart';
//import 'package:flutter_app_master/bean/msg_list_entity.dart';
//import 'package:flutter_app_master/bean/msg_page_entity.dart';
//import 'package:flutter_app_master/bean/service_range_entity.dart';
//import 'package:flutter_app_master/bean/sub_list_entity.dart';
//import 'package:flutter_app_master/bean/update_send_order_state_entity.dart';
//import 'package:flutter_app_master/bean/userinfo_entity.dart';
//import 'package:flutter_app_master/bean/wallet_info_entity.dart';
//import 'package:flutter_app_master/bean/wx_pay_info_entity.dart';
//import 'package:flutter_app_master/generated/json/account_skills_entity_helper.dart';
//import 'package:flutter_app_master/generated/json/bank_list_entity_helper.dart';
//import 'package:flutter_app_master/generated/json/bill_entity_helper.dart';
//import 'package:flutter_app_master/generated/json/general_submission_entity_helper.dart';
//import 'package:flutter_app_master/generated/json/get_sign_contract_manage_entity_helper.dart';
//import 'package:flutter_app_master/generated/json/msg_list_entity_helper.dart';
//import 'package:flutter_app_master/generated/json/msg_page_entity_helper.dart';
//import 'package:flutter_app_master/generated/json/service_range_entity_helper.dart';
//import 'package:flutter_app_master/generated/json/sub_list_entity_helper.dart';
//import 'package:flutter_app_master/generated/json/update_send_order_state_entity_helper.dart';
//import 'package:flutter_app_master/generated/json/userinfo_entity_helper.dart';
//import 'package:flutter_app_master/generated/json/wallet_info_entity_helper.dart';
//import 'package:flutter_app_master/generated/json/wx_pay_info_entity_helper.dart';
//import 'package:flutter_app_master/utils/request_util.dart';
//
//class MineService {
//  ///获取个人信息
//  static Future<UserinfoEntity> getUserInfoList() async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.getUserInfoList, data: {'UserID': Api.userName,'limit':1});
//    return userinfoEntityFromJson(UserinfoEntity(), response.data);
//  }
//  ///获取钱包信息
//  static Future<WalletInfoEntity> getWalletInfo() async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.getWalletInfo, data: {});
//    return walletInfoEntityFromJson(WalletInfoEntity(), response.data);
//  }
//  ///获取我绑定的银行卡列表
//  static Future<BankListEntity> getAccountPayInfoList() async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.getAccountPayInfoList, data: {'UserID': Api.userName});
//    return bankListEntityFromJson(BankListEntity(), response.data);
//  }
//  ///添加或删除银行卡
//  static Future<Item1Item2Entity> addorUpdateAccountPayInfo(
//        String payInfoCode,
//        String payInfoName,
//        String payNo,
//        String payName,
//        String isUse,
//        int accountPayID,
//      ) async {
//    var response = await RequestUtil
//        .post(Api.addorUpdateAccountPayInfo, {
//          'UserId': Api.userName,
//          'PayInfoCode': payInfoCode,
//          'PayInfoName': payInfoName,
//          'PayNo': payNo,
//          'PayName': payName,
//          'IsUse': isUse,
//          'AccountPayID':accountPayID
//        });
//    return item1Item2EntityFromJson(Item1Item2Entity(), response);
//  }
//  ///提现
//  static Future<Item1Item2Entity> withDraw(
//      String drawMoney,
//      String cardNo,
//      String cardName,
//      ) async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.withDraw, data: {
//      'UserID': Api.userName,
//      'DrawMoney': drawMoney,
//      'CardNo': cardNo,
//      'CardName': cardName,
//    });
//    return item1Item2EntityFromJson(Item1Item2Entity(), response.data);
//  }
//  ///收支明细
//  static Future<BillEntity> accountBill(
//      String state,
//      int page,
//      int limit,
//      ) async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.accountBill, data: {
//      'UserID': Api.userName,
//      'state': state,
//      'page': page,
//      'limit': limit,
//    });
//    return billEntityFromJson(BillEntity(), response.data);
//  }
//  ///支付宝
//  static Future<Item1Item2Entity> getOrderStr(
//      String totalAmount,String type
//      ) async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.getOrderStr, data: {
//      'UserID': Api.userName,
//      'BisId' : '',
//      'OrderId' : '',
//      'TotalAmount' : totalAmount,
//      'Type' : type,
////      'Style' : 'worker',
//      'JsonStr' : ''
//    });
//    return item1Item2EntityFromJson(Item1Item2Entity(), response.data);
//  }
//  ///微信
//  static Future<WxPayInfoEntity> getWXOrderStr(
//      String totalAmount,String type
//      ) async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.getWXOrderStr, data: {
//      'UserID': Api.userName,
//      'BisId' : '',
//      'OrderId' : '',
//      'TotalAmount' : totalAmount,
//      'Type' : type,
//      'Style' : 'worker',
//      'JsonStr' : ''
//    });
//    return wxPayInfoEntityFromJson(WxPayInfoEntity(), response.data);
//  }
//  ///子账号列表
//  static Future<SubListEntity> sonList(
//      String search,
//      String areaCode,
//      int page,
//      int limit,
//      ) async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.sonList, data: {
//      'search': search,
//      'areaCode' : areaCode,
//      'page' : page,
//      'limit' : limit,
//    });
//    return subListEntityFromJson(SubListEntity(), response.data);
//  }
//  ///注销子账号
//  static Future<Item1Item2Entity> cancelChildAccount(
//      String userId,
//      ) async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.cancelChildAccount, data: {
//      'ParentUserID': Api.userName,
//      'UserID': userId,
//    });
//    return item1Item2EntityFromJson(Item1Item2Entity(), response.data);
//  }
//  ///设置子账号备注
//  static Future<GeneralSubmissionEntity> nickRemarkUpdate(
//      String userId,
//      String nickRemark
//      ) async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.nickRemarkUpdate, data: {
//      'NickRemark': nickRemark,
//      'UserID': userId,
//    });
//    return generalSubmissionEntityFromJson(GeneralSubmissionEntity(), response.data);
//  }
//  ///获取电子合同
//  static Future<GetSignContractManageEntity> getSignContractManage(
//      ) async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.getSignContractManage, data: {
//    });
//    return getSignContractManageEntityFromJson(GetSignContractManageEntity(), response.data);
//  }
//  ///保存签名
//  static Future<GetSignContractManageEntity> saveAutograph(
//      String AutographPicUrl
//      ) async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.saveAutograph, data: {
//          'AutographPicUrl':AutographPicUrl
//    });
//    return getSignContractManageEntityFromJson(GetSignContractManageEntity(), response.data);
//  }
//  ///紧急联系人
//  static Future<Item1Item2Entity> updateEmergencyContact(
//      String emergencyContact,
//      ) async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.updateEmergencyContact, data: {
//      'UserId': Api.userName,
//      'emergencyContact': emergencyContact,
//    });
//    return item1Item2EntityFromJson(Item1Item2Entity(), response.data);
//  }
//  ///有无货车
//  static Future<Item1Item2Entity> isOrNoTruck(
//      String IsOrNoTruck,
//      ) async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.isOrNoTruck, data: {
//      'UserID': Api.userName,
//      'IsOrNoTruck': IsOrNoTruck,
//    });
//    return item1Item2EntityFromJson(Item1Item2Entity(), response.data);
//  }
//  ///团队人数
//  static Future<Item1Item2Entity> updateTeamNumber(
//      String teamNumber,
//      ) async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.updateTeamNumber, data: {
//      'UserID': Api.userName,
//      'teamNumber': teamNumber,
//    });
//    return item1Item2EntityFromJson(Item1Item2Entity(), response.data);
//  }
//  ///更换头像
//  static Future<GeneralSubmissionEntity> uploadAvator(
//      String avator,
//      ) async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.uploadAvator, data: {
//      'UserID': Api.userName,
//      'Avator': avator,
//    });
//    return generalSubmissionEntityFromJson(GeneralSubmissionEntity(), response.data);
//  }
//  ///获取服务区域
//  static Future<ServiceRangeEntity> getServiceAreaList(
//      ) async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.getServiceAreaList, data: {
//    });
//    return serviceRangeEntityFromJson(ServiceRangeEntity(), response.data);
//  }
//  ///更新服务区域
//  static Future<GeneralSubmissionEntity> addorUpdateServiceArea(
//      data
//      ) async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.addorUpdateServiceArea, data: data);
//    return generalSubmissionEntityFromJson(GeneralSubmissionEntity(), response.data);
//  }
//  ///获取账号技能
//  static Future<AccountSkillsEntity> getAccountSkill(
//      ) async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.getAccountSkill, data: {
//    });
//    return accountSkillsEntityFromJson(AccountSkillsEntity(), response.data);
//  }
//  ///消息
//  static Future<MsgPageEntity> getMessagePag() async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.getMessagePag, data: {
//      'UserID': Api.userName
//    });
//    return msgPageEntityFromJson(MsgPageEntity(), response.data);
//  }
//  ///消息列表
//  static Future<MsgListEntity> getMessageListByType(
//      int type,
//      int subType,
//      int limit,
//      int page
//      ) async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.getMessageListByType, data: {
//      'UserID': Api.userName,
//      'Type': type,
//      'Subtype': subType,
//      'limit': limit,
//      'page': page,
//    });
//    return msgListEntityFromJson(MsgListEntity(), response.data);
//  }
//  ///已读
//  static Future<Item1Item2Entity> addOrUpdatemessage(
//      int messageID,
//      ) async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.addOrUpdatemessage, data: {
//      'MessageID': messageID,
//      'IsLook': '2',
//    });
//    return item1Item2EntityFromJson(Item1Item2Entity(), response.data);
//  }
//  ///全部已读
//  static Future<GeneralSubmissionEntity> allRead(
//      int type,
//      int subType,
//      ) async {
//    var response = await RequestUtil.getInstance()
//        .post(Api.readMsg, data: {
//      'UserID': Api.userName,
//      'Type': type,
//      'Subtype': subType,
//    });
//    return generalSubmissionEntityFromJson(GeneralSubmissionEntity(), response.data);
//  }
//}
